# -*- encoding:utf-8 -*-
# !/usr/bin/env python
'''
    python-0804-06.py
    ======================
    @descript: 命名关键字参数
    @copyright:nnz
    @author:dln
    @date: 2021/8/4 20:26
    @version:v1.0
'''
def f_01(*,name,age,sex):
    print(name,age,sex)
    pass
def f_02(*args,name,age,sex):
    print(name,age,sex)
    pass
f_01(name='dl',age='20',sex='女')
f_02(name='dl',age='20',sex='女')
#不定长关键字
def f_03(*,name,age,sex,**kwargs):
    print(name,age,sex)
    for v_key,v_value in kwargs.items():
        pass
    pass
f_03(name='dl',age='20',sex='女',tel='345687')

#把一个字典对象传递给关键字参数
v_dict=dict(tel='235568',addte='shanxi')
f_03(name='dl',age='20',sex='女',**v_dict)
f_03(name='dl',age='20',sex='女',tel=v_dict['tel'],addte=v_dict['addte'])